import RP from 'lemonce-result-parser';

module.exports = function (task, resultRaw) {
	if (!task || !resultRaw) {
		return null;
	}

	var resOpts = {name: 's13', tR: []};

	resultRaw.forEach(function (result) {
		resOpts.tR.push({
			data: JSON.parse(result.data)
		});
	});

	return new RP(task, resOpts);
};
